﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Spread.Master" AutoEventWireup="true" CodeBehind="TimedLoadOnDemand.aspx.cs" Inherits="ControlExplorer.samples.LoadOnDemand.TimedLoadOnDemand" %>
<%@ Register Assembly="FarPoint.Web.Spread"
    Namespace="FarPoint.Web.Spread" TagPrefix="FarPoint" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  <script type="text/javascript">
    function RowStart() {
      document.getElementById("<%= Label1.ClientID %>").innerHTML = "后台加载数据行...";
    }

    function RowStop(e) {
      var e = e || window.event;
      var rowsToBeLoaded = e.rowsToBeLoaded;
      if (rowsToBeLoaded == 0) {
          document.getElementById("<%= Label1.ClientID %>").innerHTML = "";
      }
      document.getElementById("<%= Label2.ClientID %>").innerHTML = rowsToBeLoaded;
    }
  </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
  <div>
    <span>剩余记录:</span>
    <asp:Label ID="Label2" runat="server" Text=""></asp:Label>
    <asp:Label ID="Label1" runat="server" Text="" Style="float: right; font-size: small; font-style: italic;" ForeColor="Red"></asp:Label>
  </div>
  <FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="Black" BorderStyle="Solid"
    BorderWidth="1px">
    <CommandBar BackColor="Control" ButtonFaceColor="Control" ButtonHighlightColor="ControlLightLight"
      ButtonShadowColor="ControlDark">
    </CommandBar>
    <Sheets>
      <FarPoint:SheetView SheetName="Sheet1">
      </FarPoint:SheetView>
    </Sheets>
  </FarPoint:FpSpread>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ControlOptions" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Description" runat="server">
    <p>
      Timed 模式即为按时加载数据。
    </p>
</asp:Content>
